import { createRouter, createWebHashHistory } from "vue-router";

const routes=[
    {
        path:'/',           //这个表示的是根目录，即一进入的页面
        redirect:'login'    //设置页面一进来就显示的页面，即重定向到goods组件，这里写的内容是对应组将的component的值
    },
    //测试完记得删
    {
        path:'/select',
        component:()=>import('../components/selects.vue')
    },
    //
    {
        path:'/main',
        component:()=>import('../views/Main.vue'),
        children:[
            {
                path:'statistic',
                name:'statistic',
                component:()=>import('../views/Student/statistic.vue')
            },
            {
                path: 'course',
                name: 'course',
                component: () => import('../views/Student/course/coursetuopu.vue')
                
            },
            {
                path: 'course-details',
                name: 'course-details',
                component: () => import('../views/Student/course/CourseDetails.vue')
            },
            {
                path:'learnpartner',
                name:'learnpartner',
                component:()=>import('../views/Student/learnpartner.vue')
            },
            {
                path:'learnplan',
                name:'learnplan',
                component:()=>import('../views/Student/learnplan.vue')
            },
            {
                path:'personalcenter',
                name:'personalcenter',
                component:()=>import('../views/Student/personalcenter.vue')
            }
        ]
    },
    {
      path: '/login',
      name: 'login',
      component: () => import('../views/Login/AdminLogin.vue')
    },
];
const router = createRouter({
  history: createWebHashHistory(),
  routes
});

export default router;
